package kwic;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class SortFilter extends Filter
{
  private List<Line> x = new ArrayList<Line>();
  
  public void putData(Object o)
  {
    Line l = (Line) o;
    if(l != null)
      x.add(l);
    else
    {
      Collections.sort(x);
      for(Line y : x)
        super.putData(y);
      x.clear();
      super.putData(null);
    }
  }
}
